package com.dfl.launcher;

import com.dfl.api.app.guistore.SkinInfo;

interface ChangeResult {
    /**
     * 换肤成功结果.
     */
    class Success implements ChangeResult {
        private final SkinInfo skinInfo;

        public Success(SkinInfo skinInfo) {this.skinInfo = skinInfo;}

        public SkinInfo getSkinInfo() {return skinInfo;}

        @Override
        public String toString() {
            return "ChangeResult.Success";
        }
    }

    /**
     * 换肤失败结果.
     */
    class Failure implements ChangeResult {
        private final SkinInfo skinInfo;
        private final Throwable e;

        public Failure(SkinInfo skinInfo, Throwable e) {
            this.skinInfo = skinInfo;
            this.e = e;
        }

        public SkinInfo getSkinInfo() {return skinInfo;}

        public Throwable getE() {return e;}

        @Override
        public String toString() {
            return "ChangeResult.Failure";
        }
    }
}
